package com.collection.provider.biz;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.collection.provider.business.dao.UBaseMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.collection.api.entity.UBase;
import com.collection.api.entity.UBaseExample;
import com.collection.provider.business.dao.UBaseMapper;

/**
  * @Description :
  * @author : zongzp
  * @date :2017年11月7日上午9:15:16
  * @version : 1.1.0
  */
@Service
public class UBaseBiz {
	@Autowired
	private UBaseMapper uBaseMapper;
	public int countByExample(UBaseExample example){
		return uBaseMapper.countByExample(example);
	}

	public int deleteByExample(UBaseExample example){
    	return uBaseMapper.deleteByExample(example);
    }

	public int deleteByPrimaryKey(Long id){
    	return uBaseMapper.deleteByPrimaryKey(id);
    }

	public int insert(UBase record){
    	return uBaseMapper.insert(record);
    }

	public int insertSelective(UBase record){
    	return uBaseMapper.insertSelective(record);
    }

	public List<UBase> selectByExample(UBaseExample example){
    	return uBaseMapper.selectByExample(example);
    }

	public UBase selectByPrimaryKey(Long id){
    	return uBaseMapper.selectByPrimaryKey(id);
    }

	public int updateByExampleSelective(@Param("record") UBase record, 
    		@Param("example") UBaseExample example){
    	return uBaseMapper.updateByExampleSelective(record, example);
    }

	public int updateByExample(@Param("record") UBase record, 
    		@Param("example") UBaseExample example){
    	return uBaseMapper.updateByExample(record, example);
    }

	public int updateByPrimaryKeySelective(UBase record){
    	return uBaseMapper.updateByPrimaryKeySelective(record);
    }

	public int updateByPrimaryKey(UBase record){
    	return uBaseMapper.updateByPrimaryKey(record);
    }
	
	//专员加载
	public int selectUbaseCount(Map<String, Object> map){
		return uBaseMapper.selectUbaseCount(map);
	}
	//专员加载
	public List<Map<String, Object>> selectUbaseAll(Map<String, Object> map){
		return uBaseMapper.selectUbaseAll(map);
	}
	
	//经理加载
	public List<Map<String, Object>> selectUbaseAllSH(Map<String, Object> map){
		return uBaseMapper.selectUbaseAllSH(map);
	}
	//经理加载
	public int selectUbaseCountSH(Map<String, Object> map){
		return uBaseMapper.selectUbaseCountSH(map);
	}
}

